﻿using EDMDesigner.Business.MSL.CUDFunction.Association;
using EDMDesigner.Business.Util;

namespace EDMDesigner.Business.MSL.CUDFunction
{
    public class CUDFunctionMapping
    {
        public EDMDesigner.Business.SSDL.Function.Function SSDLFunction { get; set; }

        private EntityTypeCUDFunctionParametersMapping _parametersMapping;
        public EntityTypeCUDFunctionParametersMapping ParametersMapping
        {
            get
            {
                if (_parametersMapping == null)
                    _parametersMapping = new EntityTypeCUDFunctionParametersMapping();
                return _parametersMapping;
            }
        }

        private CUDFunctionResultsMapping _resultsMapping;
        public CUDFunctionResultsMapping ResultsMapping
        {
            get
            {
                if (_resultsMapping == null)
                    _resultsMapping = new CUDFunctionResultsMapping();
                return _resultsMapping;
            }
        }

        private EventedObservableCollection<CUDFunctionAssociationMapping> _associationMappings;
        public EventedObservableCollection<CUDFunctionAssociationMapping> AssociationMappings
        {
            get 
            {
                if (_associationMappings == null)
                    _associationMappings = new EventedObservableCollection<CUDFunctionAssociationMapping>();
                return _associationMappings; 
            }
        }
    }
}
